public class CreatorGeneric {
    public static void main(String[] args) {
        Creator c = new Creator();
        c.func();
    }
}

abstract class GenericWithCreate<T> {
    final T element;
    public GenericWithCreate() {
        element = create();
    }
    public abstract T create();
}

class X {
}

class Creator extends GenericWithCreate<X> {
    public X create() {
        return new X();
    }

    public void func() {
        System.out.println(element.getClass().getSimpleName());
    }
}